package com.java.program_questions;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 问题：对10个数进行排序
 * 分析：
 */
public class Question28 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入十个待排序的数：");

        int[] a = new int[10];
        for (int i = 0; i < 10; i++) {
            a[i] = sc.nextInt();
        }
        
        Arrays.sort(a);

        System.out.println("从小到大的排序是：");
        for (int i = 0; i < 10; i++) {
            System.out.print(a[i] + " ");
        }
    }
}
